package com.gg.admin.user.contorller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.gg.admin.user.service.AdminUserService;

import helpers.baseservlet.BaseServlet;


@WebServlet("/admin/RemoveUserByUidServlet")
public class RemoveUserByUidServlet extends BaseServlet {
	@Autowired
	private AdminUserService adminUserService;
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String uid=request.getParameter("uid");
		adminUserService.removeUserByUid(uid);
		request.getSession().setAttribute("users", adminUserService.ShowAllUsers());
		response.sendRedirect("/fruits/BSindex1.jsp");
	}

	

}
